#pragma once

#include <vector>
#include <string>
#include "type.h"

using namespace AllTing;

namespace AllTing
{

namespace Test
{

class IWritable;

typedef std::vector<IWritable*>		Writables;
typedef Writables::iterator			WritableIterator;
typedef Writables::const_iterator	WritableConstIterator;

class IWritable
{
public:
	virtual UInt32 Write(const Char* pszLog) const = 0;

	virtual void AddWriter(IWritable* pWritable);
	virtual void RemoveWriter(IWritable* pWritable);
};

class CompositeWritable : public IWritable
{
public:
	virtual UInt32 Write(const Char* pszLog) const;

	virtual void AddWriter(IWritable* pWritable);
	virtual void RemoveWriter(IWritable* pWritable);
    
    bool empty() const;
protected:
	Writables	vWritables_;
};

class StdOutWriter : public IWritable
{
public:
	virtual UInt32 Write(const Char* pszLog) const;
};

class OutputDebugStringWriter : public IWritable
{
public:
	virtual UInt32 Write(const Char* pszLog) const;
};

}	//namespace Test

}	//namespace AllTing